package cn.edu.jnu.booklistmainactivity;

import androidx.annotation.NonNull;

import java.io.Serializable;
import java.util.ArrayList;

import cn.edu.jnu.booklistmainactivity.data.BookItem;

/**
 * @author Administrator
 */
public class Bookshelf implements Serializable {
    private ArrayList<BookItem> bookshelf_List;

    private String Bookshelf_name;
//    private int booshelf_count;//统计有多少本书

    public Bookshelf(ArrayList<BookItem> bookshelf_list) {
        this.bookshelf_List = bookshelf_list;
    }
    public ArrayList<BookItem> getBookshelf_List(){
        return this.bookshelf_List;
     }
    public void setBookshelf_List(ArrayList<BookItem> bookshelf_List){
        this.bookshelf_List=bookshelf_List;
    }

    public String getBookshelf_name() {return Bookshelf_name;}
    public void setBookshelf_name(String bookshelf_name) {Bookshelf_name = bookshelf_name;}

    @NonNull
    @Override
    public String toString() {
        if(Bookshelf_name!=null){
            return Bookshelf_name+"("+bookshelf_List.size()+")";
        }
        else{
            return "自定义新增书架"+"("+bookshelf_List.size()+")";
        }
    }
}

